package com.zhiche.lisa.tms.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 装车单
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
@TableName("lisa_shipment")
public class Shipment extends Model<Shipment> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 装车单编号
     */
    private String code;
    /**
     * 承运商/人标识
     */
    @TableField("carrier_id")
    private String carrierId;
    /**
     * 运输工具标识（如：车牌号）
     */
    @TableField("transportation_id")
    private String transportationId;
    /**
     * 具体司机标识
     */
    @TableField("driver_id")
    private String driverId;
    /**
     * 具体司机姓名
     */
    @TableField("driver_name")
    private String driverName;
    /**
     * 具体司机电话
     */
    @TableField("driver_phone")
    private String driverPhone;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 实际启程时间
     */
    @TableField("gmt_setoff")
    private Date gmtSetoff;
    /**
     * 实际交付时间
     */
    @TableField("gmt_deliver")
    private Date gmtDeliver;

    /**
     * 租户ID
     */
    @TableField("tenant_id")
    private Long tenantId;

    /**
     * 承运商id
     */
    @TableField("lsp_id")
    private String lspId;

    /**
     * 承运商name
     */
    @TableField("lsp_name")
    private String lspName;

    /**
     * 车队id
     */
    @TableField("fleet_id")
    private String fleetId;

    /**
     * 车队名
     */
    @TableField("fleet_name")
    private String fleetName;

    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;
    /**
     * 运输方式
     */
    @TableField("trans_type_id")
    private Long transTypeId;

    /**
     * otm指令号
     */
    @TableField("ship_source_key")
    private String shipSourceKey;

    /**
     * otm指令号
     */
    @TableField("wms_ship_time")
    private Date wmsShipTime;

    /**
     * 是否上传照片
     */
    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private String isPhotoUpload;

    /**
     * 照片是否审核
     */
    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private String authStatus;

    /**
     * 运输方式值
     */
    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private String transType;

    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }

    public String getIsPhotoUpload() {
        return isPhotoUpload;
    }

    public void setIsPhotoUpload(String isPhotoUpload) {
        this.isPhotoUpload = isPhotoUpload;
    }

    public String getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(String authStatus) {
        this.authStatus = authStatus;
    }

    public Date getWmsShipTime() {
        return wmsShipTime;
    }

    public void setWmsShipTime(Date wmsShipTime) {
        this.wmsShipTime = wmsShipTime;
    }

    public String getShipSourceKey() {
        return shipSourceKey;
    }

    public void setShipSourceKey(String shipSourceKey) {
        this.shipSourceKey = shipSourceKey;
    }

    public Long getTransTypeId() {
        return transTypeId;
    }

    public void setTransTypeId(Long transTypeId) {
        this.transTypeId = transTypeId;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCarrierId() {
        return carrierId;
    }

    public void setCarrierId(String carrierId) {
        this.carrierId = carrierId;
    }

    public String getTransportationId() {
        return transportationId;
    }

    public void setTransportationId(String transportationId) {
        this.transportationId = transportationId;
    }

    public String getDriverId() {
        return driverId;
    }

    public void setDriverId(String driverId) {
        this.driverId = driverId;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverPhone() {
        return driverPhone;
    }

    public void setDriverPhone(String driverPhone) {
        this.driverPhone = driverPhone;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtSetoff() {
        return gmtSetoff;
    }

    public void setGmtSetoff(Date gmtSetoff) {
        this.gmtSetoff = gmtSetoff;
    }

    public Date getGmtDeliver() {
        return gmtDeliver;
    }

    public void setGmtDeliver(Date gmtDeliver) {
        this.gmtDeliver = gmtDeliver;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getLspId() {
        return lspId;
    }

    public void setLspId(String lspId) {
        this.lspId = lspId;
    }

    public String getLspName() {
        return lspName;
    }

    public void setLspName(String lspName) {
        this.lspName = lspName;
    }

    public String getFleetId() {
        return fleetId;
    }

    public void setFleetId(String fleetId) {
        this.fleetId = fleetId;
    }

    public String getFleetName() {
        return fleetName;
    }

    public void setFleetName(String fleetName) {
        this.fleetName = fleetName;
    }


    @Override
    public String toString() {
        return "Shipment{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", carrierId='" + carrierId + '\'' +
                ", transportationId='" + transportationId + '\'' +
                ", driverId='" + driverId + '\'' +
                ", driverName='" + driverName + '\'' +
                ", driverPhone='" + driverPhone + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtSetoff=" + gmtSetoff +
                ", gmtDeliver=" + gmtDeliver +
                ", tenantId=" + tenantId +
                ", lspId='" + lspId + '\'' +
                ", lspName='" + lspName + '\'' +
                ", fleetId='" + fleetId + '\'' +
                ", fleetName='" + fleetName + '\'' +
                ", isDelete=" + isDelete +
                ", transTypeId=" + transTypeId +
                ", shipSourceKey=" + shipSourceKey +
                '}';
    }
}
